package com.example.ignite.service;

public interface Cache<K, V> {

    public V get(K key);

    public void put(K key, V value);

    public boolean putIfAbsent(K key, V value);

    public void remove(K key);

    public <T> T doInTransaction(Callable<T> action);

    interface Callable<T> {
        T call();
    }

    interface ModifyAware {
        void increaseModifyCount();
        void decreaseModifyCount();
        void clearModifyCount();
        int getModifyCount();
    }

}
